<?php
/**
 * Created by PhpStorm.
 * User: CuYen
 * Date: 5/20/14
 * Time: 12:00 AM
 */
if ( ! defined('BASEPATH')) exit('No direct script access allowed'); // basePath
class Getdata extends CI_Controller
{
    public function index()
    {
        $data = array(
            "listUsers" => $this->listUser()
        );

        $this->load->view('getdata/index', $data); // listUsers will become variable when you load view
    }
    public function listUser()
    {
        $this->load->model("fetchdata"); // load model name fetchdata

        // $this->load->library('calendar');

        return $this->fetchdata->get_list_users(); // contain data

    }

}